home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-18 | 5.9 KB | 221 lines | [TEXT/MPS ] |
- ;
- ; File: LocationManager.a
- ;
- ; Contains: LocationManager (manange preferences for different physical locations)
- ;
- ; Version: System 7.6
- ; Package: Location Manager SDK 1.0
- ;
- ; Copyright: © 1984-1997 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@apple.com
- ;
- ;
- IF &TYPE('__LOCATIONMANAGER__') = 'UNDEFINED' THEN
- __LOCATIONMANAGER__ SET 1
-
- IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
- include 'AppleEvents.a'
- ENDIF
- IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
- include 'Components.a'
- ENDIF
- IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
- include 'Processes.a'
- ENDIF
- IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
- include 'Dialogs.a'
- ENDIF
- ;
- ;--------------------------------------------------------------------------------------
- ; Location token
- ;--------------------------------------------------------------------------------------
- ;
-
-
- ;
- ;--------------------------------------------------------------------------------------
- ; Public error codes
- ;--------------------------------------------------------------------------------------
- ;
-
- ALMInternalErr EQU -30049
- ALMLocationNotFound EQU -30048
- ALMNoSuchModuleErr EQU -30047
- ALMModuleCommunicationErr EQU -30046
- ALMDuplicateModuleErr EQU -30045
- ALMInstallationErr EQU -30044
- ALMDeferSwitchErr EQU -30043
- ALMLastErr EQU -30043
- ALMLastAllocatedErrNum EQU -30030
-
- ;
- ;--------------------------------------------------------------------------------------
- ; Various parameters
- ;--------------------------------------------------------------------------------------
- ;
-
- ; ALMConfirmName reports these results
-
- ALMConfirmRenameConfig EQU 1
- ALMConfirmReplaceConfig EQU 2
-
- ; ALMSwitchToLocation masks
-
- kALMDefaultSwitchFlags EQU 0
- kALMDontShowStatusWindow EQU 1
- kALMSignalViaAE EQU 2
-
- kALMLocationNameMaxLen EQU 31
- kALMMaxLocations EQU 16 ; arbitrary limit. enforced by LocatioManager.
- kALMNoLocationIndex EQU -1 ; index and token for the 'off' location
- kALMNoLocationToken EQU -1
- kAELocationNotice EQU 'walk' ; Notification AEvent sent to apps when location changes
- kALMFileCreator EQU 'walk' ; creator type of LocatioManager files
-
- ; gestalt selectors
-
- gestaltALMVers EQU 'walk'
- gestaltALMAttr EQU 'trip'
- gestaltALMPresent EQU 0
-
- ;
- ;--------------------------------------------------------------------------------------
- ; Dispatched trap API
- ;--------------------------------------------------------------------------------------
- ;
- ;
- ; pascal OSErr ALMGetCurrentLocation(SInt16 *index, ALMToken *token, Str31 name)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ALMGetCurrentLocation
- move.w #$0600,D0
- dc.w $AAA4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ALMGetCurrentLocation
- ENDIF
-
- ;
- ; pascal OSErr ALMGetIndLocation(SInt16 index, ALMToken *token, Str31 name)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ALMGetIndLocation
- move.w #$0501,D0
- dc.w $AAA4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ALMGetIndLocation
- ENDIF
-
- ;
- ; pascal OSErr ALMCountLocations(SInt16 *nLocations)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ALMCountLocations
- move.w #$0202,D0
- dc.w $AAA4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ALMCountLocations
- ENDIF
-
- ;
- ; pascal OSErr ALMSwitchToLocation(ALMToken newLocation, SInt32 switchFlags)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ALMSwitchToLocation
- move.w #$0403,D0
- dc.w $AAA4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ALMSwitchToLocation
- ENDIF
-
- ;
- ; pascal OSErr ALMRegisterNotifyProc(ALMNotificationUPP notificationProc, const ProcessSerialNumber *whichPSN)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ALMRegisterNotifyProc
- move.w #$0404,D0
- dc.w $AAA4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ALMRegisterNotifyProc
- ENDIF
-
- ;
- ; pascal OSErr ALMRemoveNotifyProc(ALMNotificationUPP notificationProc, const ProcessSerialNumber *whichPSN)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ALMRemoveNotifyProc
- move.w #$0405,D0
- dc.w $AAA4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ALMRemoveNotifyProc
- ENDIF
-
- ;
- ; pascal OSErr ALMConfirmName(ConstStr255Param msg, Str255 configName, SInt16 *choice, ModalFilterUPP filter)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _ALMConfirmName
- move.w #$0806,D0
- dc.w $AAA4
- EndM
- ELSE
- IMPORT_CFM_FUNCTION ALMConfirmName
- ENDIF
-
- ;
- ;--------------------------------------------------------------------------------------
- ; Location Manager User Module API
- ;--------------------------------------------------------------------------------------
- ;
-
- kALMComponentType EQU 'walk' ; These masks apply to the "flags" field in the ComponentDescription record.
- kALMMultiplePerLocation EQU 1 ; this module can be added more than once to a location
- ; this module's settings' descriptions can change even
- kALMDescriptionGetsStale EQU 2 ; when the setting didn't change.
-
- ; typedef UInt32 ALMComponentFlagsEnum
-
- ; typedef UInt32 ALMRebootFlags
-
-
- ; These are the possible values of ALMRebootFlags to be returned in the 'flags' parameter of ALMSetCurrent()
- kALMNoChange EQU 0
- kALMAvailableNow EQU 1
- kALMFinderRestart EQU 2
- kALMProcesses EQU 3
- kALMExtensions EQU 4
- kALMWarmBoot EQU 5
- kALMColdBoot EQU 6
- kALMShutdown EQU 7
-
- kALMScriptInfoVersion EQU 2
- ALMScriptMgrInfo RECORD 0
- version ds.w 1 ; offset: $0 (0) ; set to kALMScriptInfoVersion
- scriptCode ds.w 1 ; offset: $2 (2)
- regionCode ds.w 1 ; offset: $4 (4)
- langCode ds.w 1 ; offset: $6 (6)
- fontNum ds.w 1 ; offset: $8 (8)
- fontSize ds.w 1 ; offset: $A (10)
- sizeof EQU * ; size: $C (12)
- ENDR
-
- ENDIF ; __LOCATIONMANAGER__
-
-